function changeSelectedHiddenValueById(obj,hiddenId){
	$("#" + hiddenId).val($(obj).find("option:selected").text());
}
/**
 * 获取  角色  数据字典
 */
function getSysRoleDictData(selectedId,selectedValue){
	$.ajax({  
        type:'post',      
        url: webroot + '/admin/system/queryListRolesData',  
        data:{"noPage":1,"status":1},  
        cache:false,  
        async:true,
        dataType:'json',  
        success:function(data){
        	if(checkResponseData(data,"0")){
        		$("#" + selectedId).html("");
        		$("#" + selectedId).append("<option value=''>---请选择---</option>");
        		for(var i = 0 ; i < data.roleList.length; i++ ){
        			var role = data.roleList[i];
        			if(selectedValue ==  role.id){
        				$("#" + selectedId).append("<option selected value='"+ role.id +"'>"+ role.zhName +"</option>");
        			}else{
        				$("#" + selectedId).append("<option value='"+ role.id +"'>"+ role.zhName +"</option>");
        			}
        		}
        	};
        }  
    });  
}

/**
 * 获取 用户 数据字典
 */
var payUserListArray = "";
function getPayUserDictData(selectedId,selectedValue){
	$.ajax({  
        type:'post',      
        url:ctx + '/admin/pay/user/getPayUserDictData',  
        data:{},  
        cache:false,  
        dataType:'json',  
        success:function(data){
        	if(showResult(data,"0")){
        		$("#" + selectedId).html("");
        		$("#" + selectedId).append("<option value=''>---请选择---</option>");
        		payUserListArray = data.list;
        		for(var i = 0 ; i < data.list.length; i++ ){
        			var payUser = data.list[i];
        			if(selectedValue ==  payUser.value){
        				$("#" + selectedId).append("<option selected value='"+ payUser.value +"'>"+ payUser.name +"</option>");
        			}else{
        				$("#" + selectedId).append("<option value='"+ payUser.value +"'>"+ payUser.name +"</option>");
        			}
        		}
        	};
        }  
    });  
}



var payBankListArray = "";
/**
 * 获取 参与行 数据字典
 * @param selectedId
 * @param selectedValue
 */
function getPayBankDictData(selectedId,selectedValue){
	$.ajax({  
		type:'post',      
		url:ctx + '/admin/pay/bank/getPayBankDictData',  
		data:{},  
		cache:false,  
		dataType:'json',  
		success:function(data){
			if(showResult(data,"0")){
				payBankListArray = data.list;
				$("#" + selectedId).html("");
				$("#" + selectedId).append("<option value=''>---请选择---</option>");
				//alert(data.list);
				$.each(data.list,function(i,item){ 
					if(selectedValue == item.value){
						$("#" + selectedId).append("<option selected value='"+ item.value +"'>"+ item.name+"</option>");
					}else{
						$("#" + selectedId).append("<option value='"+ item.value +"'>"+ item.name+"</option>");
					}
				}); 
			};
		},
		error:function(){
			alert("初始化参与行失败");
		}
	});  
}
var payChannelListArray = "";
/**
 * 获取 支付渠道 数据字典
 * @param selectedId
 * @param selectedValue
 */
function getPayChannelDict(selectedId,selectedValue){
	$.ajax({  
        type:'post',      
        url:ctx + '/admin/pay/channel/getPayChannelDict',  
        data:{},  
        cache:false,  
        dataType:'json',  
        success:function(data){
        	if(showResult(data,"0")){
        		$("#" + selectedId).html("");
        		$("#" + selectedId).append("<option value>---请选择---</option>");
        		payChannelListArray = data.resultList;
        		for(var i = 0 ; i < data.resultList.length; i++ ){
        			if(selectedValue ==  data.resultList[i].value){
        				$("#" + selectedId).append("<option selected value='"+ data.resultList[i].value +"'>"+ data.resultList[i].name +"</option>");
        			}else{
        				$("#" + selectedId).append("<option value='"+ data.resultList[i].value +"'>"+ data.resultList[i].name +"</option>");
        			}
        		}
        	};
        }  
    });  
}
/**
 * 获取 费率等级 数据字典
 * @param selectedId
 * @param selectedValue
 */
function getPayRateLevelDictData(selectedId,selectedValue){
	$.ajax({  
		type:'post',      
		url:ctx + '/admin/pay/rate/getPayRateLevelDictData',  
		data:{},  
		cache:false,  
		dataType:'json',  
		success:function(data){
			if(showResult(data,"0")){
				$("#" + selectedId).html("");
				$("#" + selectedId).append("<option value=''>---请选择---</option>");
				//alert(data.list);
				$.each(data.list,function(i,item){ 
					$("#" + selectedId).append("<option value='"+ item.name +"'>"+ item.value+"</option>");
				}); 
			};
		},
		error:function(){
			alert("初始化费率等级失败");
		}
	});  
}

var payProvinceCityListArray = "";
/**
 * 获取省市数据字典
 * @param selectedId
 * @param selectedValue
 */
function getPayProvinceCityData(selectedId,parentId,selectedValue){
	$.ajax({  
		type:'post',      
		url:ctx + '/admin/pay/user/getPayProvinceCityData',  
		data:{"parentId":parentId},  
		cache:false,  
		dataType:'json',  
		success:function(data){
			if(showResult(data,"0")){
				$("#" + selectedId).html("");
				$("#" + selectedId).append("<option value=''>---请选择---</option>");
				//alert(data.list);
				$.each(data.list,function(i,item){ 
					if(selectedValue == item.value){
						$("#" + selectedId).append("<option selected value='"+ item.value +"'>"+ item.name+"</option>");
					}else{
						$("#" + selectedId).append("<option value='"+ item.value +"'>"+ item.name+"</option>");
					}
				}); 
			};
		},
		error:function(){
			alert("初始化费率等级失败");
		}
	});  
}
var merchantProfessionLevel2ListArray = "";
/**
 * 获取商户行业数据字典 按商户行业等级获取
 * @param selectedId
 * @param level
 * @param selectedValue
 */
function getMerchantProfessionDictData(selectedId,level,selectedValue){
	$.ajax({  
		type:'post',      
		url:ctx + '/admin/merchant/profession/getMerchantProfessionDictData',  
		data:{"level":level},  
		cache:false,  
		dataType:'json',  
		success:function(data){
			if(showResult(data,"0")){
				$("#" + selectedId).html("");
				$("#" + selectedId).append("<option value=''>---请选择---</option>");
				//alert(data.list);
				if(level == "2"){
					merchantProfessionLevel2ListArray = data.merchantProfessionList;
				}
				$.each(data.merchantProfessionList,function(i,item){ 
					if(selectedValue != ""){
						if(selectedValue ==  item.entityId){
	        				$("#" + selectedId).append("<option selected value='"+ item.entityId +"'>"+ item.professionName +"</option>");
	        			}else{
	        				$("#" + selectedId).append("<option value='"+ item.entityId +"'>"+ item.professionName+"</option>");
	        			}
					}else{
						$("#" + selectedId).append("<option value='"+ item.entityId +"'>"+ item.professionName+"</option>");
					}
				}); 
			};
		},
		error:function(){
			alert("初始化商户行业失败");
		}
	});  
}

/**
 * 获取商户行业数据字典 按父级商户行业ID获取
 * @param selectedId
 * @param parentProfessionId
 * @param selectedValue
 */
function getMerchantProfessionByParentIdDictData(selectedId,parentProfessionId,selectedValue){
	$.ajax({  
		type:'post',      
		url:ctx + '/admin/merchant/profession/getMerchantProfessionByParentIdDictData',  
		data:{"parentProfessionId":parentProfessionId},  
		cache:false,  
		dataType:'json',  
		success:function(data){
			if(showResult(data,"0")){
				$("#" + selectedId).html("");
				$("#" + selectedId).append("<option value=''>---请选择---</option>");
				//alert(data.list);
				$.each(data.merchantProfessionList,function(i,item){ 
					if(selectedValue != ""){
						if(selectedValue ==  item.entityId){
	        				$("#" + selectedId).append("<option selected value='"+ item.entityId +"'>"+ item.professionName +"</option>");
	        			}else{
	        				$("#" + selectedId).append("<option value='"+ item.entityId +"'>"+ item.professionName+"</option>");
	        			}
					}else{
						$("#" + selectedId).append("<option value='"+ item.entityId +"'>"+ item.professionName+"</option>");
					}
				}); 
			};
		},
		error:function(){
			alert("初始化商户行业失败");
		}
	});  
}

var payOrderStatusListArray = "";
/**
 * 获取 订单支付状态 数据字典
 * @param selectedId
 * @param selectedValue
 */
function getPayOrderStatusDictData(selectedId,selectedValue){
	$.ajax({  
        type:'post',      
        url:ctx + '/admin/order/getPayOrderStatusDictData',  
        data:{},  
        cache:false,  
        dataType:'json',  
        success:function(data){
        	if(showResult(data,"0")){
        		$("#" + selectedId).html("");
        		$("#" + selectedId).append("<option value>---请选择---</option>");
        		payOrderStatusListArray = data.list;
        		for(var i = 0 ; i < data.list.length; i++ ){
        			if(selectedValue ==  data.list[i].name){
        				$("#" + selectedId).append("<option selected value='"+ data.list[i].name +"'>"+ data.list[i].value +"</option>");
        			}else{
        				$("#" + selectedId).append("<option value='"+ data.list[i].name +"'>"+ data.list[i].value +"</option>");
        			}
        		}
        	};
        }  
    });  
}

var payOrderTypeListArray = "";
/**
 * 获取 订单类型 数据字典
 * @param selectedId
 * @param selectedValue
 */
function getPayOrderTypeDictData(selectedId,selectedValue){
	$.ajax({  
        type:'post',      
        url:ctx + '/admin/order/getPayOrderTypeDictData',  
        data:{},  
        cache:false,  
        dataType:'json',  
        success:function(data){
        	if(showResult(data,"0")){
        		$("#" + selectedId).html("");
        		$("#" + selectedId).append("<option value>---请选择---</option>");
        		payOrderTypeListArray = data.list;
        		for(var i = 0 ; i < data.list.length; i++ ){
        			if(selectedValue ==  data.list[i].name){
        				$("#" + selectedId).append("<option selected value='"+ data.list[i].name +"'>"+ data.list[i].value +"</option>");
        			}else{
        				$("#" + selectedId).append("<option value='"+ data.list[i].name +"'>"+ data.list[i].value +"</option>");
        			}
        		}
        	};
        }  
    });  
}

var payProcessResultListArray = "";
/**
 * 获取 订单处理结果 数据字典
 * @param selectedId
 * @param selectedValue
 */
function getPayProcessResultDictData(selectedId,selectedValue){
	$.ajax({  
        type:'post',      
        url:ctx + '/admin/order/getPayProcessResultDictData',  
        data:{},  
        cache:false,  
        dataType:'json',  
        success:function(data){
        	if(showResult(data,"0")){
        		$("#" + selectedId).html("");
        		$("#" + selectedId).append("<option value>---请选择---</option>");
        		payProcessResultListArray = data.list;
        		for(var i = 0 ; i < data.list.length; i++ ){
        			if(selectedValue ==  data.list[i].name){
        				$("#" + selectedId).append("<option selected value='"+ data.list[i].name +"'>"+ data.list[i].value +"</option>");
        			}else{
        				$("#" + selectedId).append("<option value='"+ data.list[i].name +"'>"+ data.list[i].value +"</option>");
        			}
        		}
        	};
        }  
    });  
}

/**
 * 获取 对账记录状态 数据字典
 * @param selectedId
 * @param selectedValue
 */
function getPayBillHistoryResultDict(selectedId,selectedValue){
	$.ajax({  
        type:'post',      
        url:ctx + '/admin/pay/bill/getPayBillHistoryResultDict',  
        data:{},  
        cache:false,  
        dataType:'json',  
        success:function(data){
        	if(showResult(data,"0")){
        		$("#" + selectedId).html("");
        		$("#" + selectedId).append("<option value>---请选择---</option>");
        		payProcessResultListArray = data.list;
        		for(var i = 0 ; i < data.list.length; i++ ){
        			if(selectedValue ==  data.list[i].name){
        				$("#" + selectedId).append("<option selected value='"+ data.list[i].name +"'>"+ data.list[i].value +"</option>");
        			}else{
        				$("#" + selectedId).append("<option value='"+ data.list[i].name +"'>"+ data.list[i].value +"</option>");
        			}
        		}
        	};
        }  
    });  
}

var checkSysActivityStatusListArray = "";
/**
 * 获取 平台活动审核状态 数据字典
 * @param selectedId
 * @param selectedValue
 */
function getCheckSysActivityStatusDictData(selectedId,selectedValue){
	$.ajax({  
        type:'post',      
        url:ctx + '/admin/systemactivity/getCheckSysActivityStatusDictData',  
        data:{},  
        cache:false,  
        dataType:'json',  
        success:function(data){
        	if(showResult(data,"0")){
        		$("#" + selectedId).html("");
        		$("#" + selectedId).append("<option value>---请选择---</option>");
        		checkSysActivityStatusListArray = data.list;
        		for(var i = 0 ; i < data.list.length; i++ ){
        			if(selectedValue ==  data.list[i].name){
        				$("#" + selectedId).append("<option selected value='"+ data.list[i].name +"'>"+ data.list[i].value +"</option>");
        			}else{
        				$("#" + selectedId).append("<option value='"+ data.list[i].name +"'>"+ data.list[i].value +"</option>");
        			}
        		}
        	};
        }  
    });  
}

/**
 * 获取 商城 数据字典
 * @param selectedId
 * @param selectedValue
 */
function getMerchantNameDict(selectedId,selectedValue){
	$.ajax({  
        type:'post',      
        url:ctx + '/admin/pay/shopping/getMerchantNameDict',  
        data:{},  
        cache:false,  
        dataType:'json',  
        success:function(data){
        	if(showResult(data,"0")){
        		$("#" + selectedId).html("");
        		$("#" + selectedId).append("<option value>---请选择---</option>");
        		payChannelListArray = data.resultList;
        		for(var i = 0 ; i < data.resultList.length; i++ ){
        			if(selectedValue ==  data.resultList[i].value){
        				$("#" + selectedId).append("<option selected value='"+ data.resultList[i].value +"'>"+ data.resultList[i].name +"</option>");
        			}else{
        				$("#" + selectedId).append("<option value='"+ data.resultList[i].value +"'>"+ data.resultList[i].name +"</option>");
        			}
        		}
        	};
        }  
    });  
}

